package com.kh.pajx.sop.domain;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * 部门信息实体对象
 * SYS_DEPARTMENT
 * @author:	azzcsimp
 * @Createdate:	2014年7月19日 上午2:03:20
 */
public class SysDepartment implements Serializable {

	private static final long serialVersionUID = -6262469891235483906L;
	
	/** 部门编号 */
	private String deptId;
	
	/** 部门名称 */
	private String deptName;
	
	/** 部门编码 */
	private String deptCode;
	
	/** 上级部门信息 */
	private SysDepartment parent;
	
	/** 子部门 */
	private Set<SysDepartment> children = new HashSet<SysDepartment>();
	
	@Override
	public boolean equals(Object obj) {
		if(null == obj) return false;
		if(!(obj instanceof SysDepartment)) return false;
		else{
			SysDepartment department = (SysDepartment)obj;
			if(null == this.getDeptId() || null == department.getDeptId()) return false;
			else return (this.getDeptId().equals(department.getDeptId()));
		}
	}
	
	// ===================================

	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getDeptCode() {
		return deptCode;
	}

	public void setDeptCode(String deptCode) {
		this.deptCode = deptCode;
	}

	public SysDepartment getParent() {
		return parent;
	}

	public void setParent(SysDepartment parent) {
		this.parent = parent;
	}

	public Set<SysDepartment> getChildren() {
		return children;
	}

	public void setChildren(Set<SysDepartment> children) {
		this.children = children;
	}
	
}
